<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./bootstrap.min.css">
    <style>
        h2 {
            width: 1000px;
            height: 50px;
            text-align: center;
            margin: 10px auto;
        }

        table {
            width: 1400px !important;
            margin: 0 auto;
        }
    </style>
</head>

<body>
    <h2>学生列表</h2>
    <hr>
    <table class="table">
        <thead>
            <th>学号</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>性别</th>
            <th>城市</th>
            <th>操作</th>
        </thead>
        <tbody>
            <% for(let i = 0;i < studentList.length;i++){ %>
            <tr>
                <td><%= studentList[i].id %></td>
                <td><%= studentList[i].name %></td>
                <td><%= studentList[i].age %></td>
                <td><%= studentList[i].sex ? '男' : '女' %></td>
                <td><%= studentList[i].city %></td>
                <td><a href="javascript:;" class="btn btn-primary">查看详情</a></td>
            </tr>
            <% } %>
        </tbody>
    </table>

</body>

</html>